Data sharing using alias objects

ABSTRACT

A method of sharing data in a multi-tenant database includes generating a share object in a first account comprising a share role. The method includes associating one or more access rights with the share role, wherein the one or more access rights indicate which objects in the first account are accessible based on the share object. The method includes granting, to a second account, cross-account access rights to the share role or share object in the first account. The method includes receiving a request from the second account to access data or services of the first account. The method further includes providing a response to the second account based on the data or services of the first account.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.17/103,786 entitled “DATA SHARING USING ALIAS OBJECTS,” filed on Nov.24, 2020, which is a continuation of is a continuation of U.S. patentapplication Ser. No. 17/004,458 entitled “GRANTING ACCESS RIGHTS TOOBJECTS,” filed on Aug. 27, 2020, now issued as U.S. Pat. No. 10,878,120on Dec. 29, 2020, which is a continuation of U.S. patent applicationSer. No. 16/833,482, entitled “DATA SHARING IN A MULTI-TENANT DATABASESYSTEM,” filed on Mar. 27, 2020, now issued as U.S. Pat. No. 10,817,616on Oct. 27, 2020, which is a continuation of U.S. patent applicationSer. No. 16/779,103, entitled “DATA SHARING IN A MULTI-TENANT DATABASESYSTEM,” filed on Jan. 31, 2020, now issued as U.S. Pat. No. 10,642,993on May 5, 2020, which is a continuation of U.S. patent application Ser.No. 15/402,906, entitled “DATA SHARING IN A MULTI-TENANT DATABASESYSTEM,” filed on Jan. 10, 2017, now issued as U.S. Pat. No. 10,592,681on Mar. 17, 2020, the contents of which are incorporated herein in theirentirety.

TECHNICAL FIELD

The present disclosure relates to databases and more particularlyrelates to data sharing in a multi-tenant database system.

BACKGROUND

Databases are widely used for data storage and access in computingapplications. Databases may include one or more tables that include orreference data that can be read, modified, or deleted using queries.Databases may be used for storing and/or accessing personal informationor other sensitive information. Secure storage and access of databasedata may be provided by encrypting and/or storing data in an encryptedform to prevent unauthorized access. In some cases, data sharing may bedesirable to let other parties perform queries against a set of data.

BRIEF DESCRIPTION OF THE DRAWINGS

Non-limiting and non-exhaustive implementations of the presentdisclosure are described with reference to the following figures,wherein like reference numerals refer to like or similar partsthroughout the various views unless otherwise specified. Advantages ofthe present disclosure will become better understood with regard to thefollowing description and accompanying drawings where:

FIG. 1 is a schematic block diagram illustrating accounts in amulti-tenant database, according to one embodiment;

FIG. 2 is a schematic diagram illustrating a system for providing andaccessing database services, according to one embodiment;

FIG. 3 is a schematic diagram illustrating a multi-tenant database withseparation of storage and computing resources, according to oneembodiment;

FIG. 4 is a schematic block diagram illustrating object hierarchies,according to one embodiment;

FIG. 5 is a schematic diagram illustrating role based access, accordingto one embodiment;

FIG. 6 is a schematic diagram illustrating a usage grant between roles,according to one embodiment;

FIG. 7 is a schematic diagram illustrating a share object, according toone embodiment;

FIG. 8 is a schematic diagram illustrating cross-account grants,according to one embodiment;

FIG. 9 is a schematic block diagram illustrating components of a sharecomponent, according to one embodiment;

FIG. 10 is a schematic flow chart diagram illustrating a method forsharing database data between accounts, according to one embodiment; and

FIG. 11 is a block diagram depicting an example computing device orsystem consistent with one or more embodiments disclosed herein.

DETAILED DESCRIPTION

Multi-tenant databases or multi-tenant data warehouse support multipledistinct customer accounts at once. As an example, FIG. 1 is a schematicblock diagram illustrating a multi-tenant database or data warehousethat supports many different customer accounts A1, A2, A3, An, etc.Customer accounts may be separated by multiple security controls,including different uniform resource locators (URLs) to connect to,different access credentials, different data storage locations (such asAmazon Web Services S3 buckets), and different account-level encryptionkeys. Thus, each customer may only be allowed to see, read, and/or writethe customer's own data. By design it may be impossible for a customerto see, read, or write another customer's data. In some cases, strictseparation of customer accounts is the backbone of a multi-tenant datawarehouses or database system.

Applicants have recognized that it may sometimes be desirable to allowcross-account data sharing. However, no current multi-tenant databasesystem allows sharing of data between different customer accounts in aninstantaneous, zero-copy, easy-controllable fashion. Existing onlinedata warehouses such as Amazon Redshift® do not support data sharingwithout physical data copying. On-premise database systems such asOracle Database Server® or Microsoft SQL Server® do not support onlinedata sharing by definition because of the physical distribution ofindividual database installations.

Based on the foregoing, Applicant has developed systems, methods, anddevices for a multi-tenant online database system. Some embodimentsallow sharing of data between different customer accounts and may makethe data instantly accessible with no need to copy data. Someembodiments provide access to data using fine-grained controls tomaintain separation of desired data while allowing access to data that acustomer wishes to share.

According to one embodiment, a computer implemented method includesgenerating a share object in a first account comprising a share role.The method includes associating one or more access rights with the sharerole, wherein the one or more access rights indicate which objects inthe first account are accessible based on the share object. The methodincludes granting, to a second account, cross-account access rights tothe share role or share object in the first account. The method furtherincludes receiving a request from the second account to access data orservices of the first account and providing a response to the secondaccount based on the data or services of the first account.

According to one embodiment, a multi-tenant database system includes across-account rights component, an alias component, and an accesscomponent. The cross-account rights component is configured to determinethat cross-account access rights to one or more shared resources havebeen granted to a target account by a sharer account. The aliascomponent is configured to create, in the target account, an aliasobject corresponding to a shared resource of the one or more sharedresources in the sharer account. The access component is configured toallow the target account to access the shared resource using a requestdirected to the alias object.

According to another embodiment, a method for providing access to shareddata in a multi-tenant database includes determining that a firstaccount has granted a second account access to a database object of thefirst account. The method includes receiving a request from the secondaccount to access the data object corresponding to the first account.The method includes processing the request using a virtual warehousecorresponding to the first account. The virtual warehouse includes a setof one or more compute nodes configured to access data in a storagelayer corresponding to the first account to generate a response to therequest.

Embodiments disclosed herein provide technology which may be used forsharing data between different customer accounts in an online databaseand/or online data warehouse. In one embodiment, data sharing is enabledusing cross-account role grants that allow users in one customer accountto access data in another customer account in a controlled andinstantaneous fashion, without the need to copy data. For example, theshared date may remain within the sharing account while allowing aforeign account to perform queries or other processes on the account,within their rights (e.g., read, write, etc.).

Embodiments disclosed herein may be used for a variety of applications.In one embodiment, a database owner may share a sample data set with newcustomer accounts for tutorials and/or introduction. In one embodiment,demo data sets may be shared from one account with demo accounts fordemoing a data warehouse or other service to potential customers. In oneembodiment, usage data collected by a database provider or host may beeasily shared with customer accounts. In one embodiment, publiclyavailable data sets may be shared from a central account with customeraccounts so that customer accounts do not have to ingest the datathemselves. In one embodiment, customers are allowed to share data withother customers for easier access to shared resources, without the needto physically copy or transmit the data. In one embodiment, customersare allowed to easily share data with an administrator for investigationof support issues. According to one embodiment, customers or otheraccount holders/owners may list information about their data on a marketplace for purchase/subscription. For example, some embodiments provide amarket place to buy and sell data sets between customer accounts of amulti-tenant database or data warehouse.

A detailed description of systems and methods consistent withembodiments of the present disclosure is provided below. While severalembodiments are described, it should be understood that this disclosureis not limited to any one embodiment, but instead encompasses numerousalternatives, modifications, and equivalents. In addition, whilenumerous specific details are set forth in the following description inorder to provide a thorough understanding of the embodiments disclosedherein, some embodiments may be practiced without some or all of thesedetails. Moreover, for the purpose of clarity, certain technicalmaterial that is known in the related art has not been described indetail in order to avoid unnecessarily obscuring the disclosure.

FIG. 2 is a schematic diagram of a system 200 for providing andaccessing database data or services. The system 200 includes a databasesystem 202, one or more servers 204, and a client computing system 206.The database system 202, the one or more servers 204, and/or the clientcomputing system 206 may communicate with each other over a network 208,such as the Internet. For example, the one or more servers 204, and/orthe client computing system 206 may access the database system 202 overthe network 208 to query a database and/or receive data from a database.The data from the database may be used by the one or more servers 204 orclient computing system 206 for any type of computing application. Inone embodiment, the database system 202 is a multi-tenant databasesystem hosting data for a plurality of different accounts.

The database system 202 includes a share component 210 and storage 212.The storage 212 may include storage media for storing data. For example,the storage 212 may include one or more storage devices for storingdatabase tables, schemas, encryption keys, data files, or any otherdata. The share component 210 may include hardware and/or software forenabling the cross-account sharing of data or services. For example, theshare component 210 may process queries/instructions received fromremote devices to access shared data or share data. Thequeries/instructions may be received from the servers 204 or clientcomputing system 106. In one embodiment, the share component 210 isconfigured to allow sharing data between accounts without creatingduplicate copies of tables, data, or the like outside the sharingaccount. For example, the share component may allow for computerresources allocated to a sharing account to perform any queries orinstructions provided by a foreign account.

In one embodiment, storage and compute resources for a database system100 may be logically and/or physically separated. In one embodiment,storage is a common, shared resource across all accounts. Computeresources may be set up independently, per account, as virtualwarehouses. In one embodiment, a virtual warehouse is a set of computenodes that access data in a storage layer and compute a query result.Separating the compute nodes or resources from the storage allowsscaling each layer independently. Separation of storage and compute alsoallows that shared data can be processed independently by differentaccounts, without the computation in one account affecting thecomputation in other accounts. That is, in at least some embodiments,there is no contention among computing resources when running queries onshared data.

FIG. 3 is a schematic block diagram of a multi-tenant database 300illustrating separation of storage and computing resources. For example,the multi-tenant database 300 may be a data warehouse where a pluralityof different accounts (A1, A2, A3, through An) are hosted. In FIG. 3,account A1 has three virtual warehouses running, account A2 has onevirtual warehouse running, and account A3 has no virtual warehouserunning. In one embodiment, all of these virtual warehouses have accessto the storage layer that is separated from the compute nodes of thevirtual warehouses. In one embodiment, virtual warehouses can bedynamically provisioned or removed based on a current workload for anaccount.

In one embodiment, a database system 300 uses object hierarchies inaccounts. For example, each customer account may contain objecthierarchies. Object hierarchies are often rooted in databases. Forexample, databases may contain schemas and schemas, in turn, may containobjects such as tables, views, sequences, file formats, and functions.Each of these objects serves a special purpose: tables store relationalor semi-structured data; views define logical abstractions over thestored data; sequences provide means to generate ever-increasingnumbers; file formats define ways to parse ingested data files; andfunctions hold user-defined execution procedures.

FIG. 4 is a schematic block diagram illustrating object hierarchieswithin customer accounts. Specifically, accounts may include hierarchiesof objects which may be referenced in a database. For example, customeraccount A1 contains two databases objects D1 and D2. Database object D1contains schema object S1, which in turn contains table object T1 andview object V1. Database object D2 contains schema object S2, whichcontains function object F2, sequence object Q2, and table object T2.Customer account A2 contains a database object D3 with schema object S3and table object T3. The object hierarchies may control how objects,data, functions, or other information or services of an account ordatabase system are accessed or referenced.

In one embodiment, a database system implements role-based accesscontrol to govern access to objects in customer accounts. In general,role-based access control consists of two basic principles: roles andgrants. In one embodiment, roles are special objects in a customeraccount that are assigned to users. Grants between roles and databaseobjects define what privileges a role has on these objects. For examplea role that has a usage grant on a database can “see” this database whenexecuting the command “show databases”; a role that has a select granton a table can read from this table but not write to the table. The rolewould need to have a modify grant on the table to be able to write toit.

FIG. 5 is a schematic block diagram illustrating role based access toobjects in customer accounts. A customer account A1 contains role R1,which has grants to all objects in the object hierarchy. Assuming thesegrants are usage grants between R1 and D1, D2, S1, S2 and select grantsbetween R1 and T1, V1, F2, Q2, T2, a user with activated role R1 can seeall objects and read data from all tables, views, and sequences and canexecute function F2 within account A1. Customer account A2 contains roleR3, which has grants to all objects in the object hierarchy. Assumingthese grants are usage grants between R3 and D3, S3, and select a grantbetween R3 and T3, a user with activated role R3 can see all objects andread data from all tables, views, and sequences within account A2.

FIG. 6 illustrates a usage grant between roles. With role-based accesscontrol, it is also possible to grant usage from one role to anotherrole. A role that has a usage grant to another role “inherits” allaccess privileges of the other role. For example, in role R2 has a usagegrant on role R1. A user (e.g., with corresponding authorizationdetails) with activated role R2 can see and read from all objectsbecause role R2 inherits all grants from role R1.

According to one embodiment, usage grants are granted across differentaccounts. An account that shares data may be referred to herein as a“sharer account” and an account with which the data is shared may bereferred to herein as a “target account”. In one embodiment, embodimentsdisclosed herein allow for instantaneous, zero-copy, easy-controllablecross-account sharing of data. In one embodiment, in order to share datawith another account, a sharer account may generate a share object.Within the share object, a role may be created and a user of the shareraccount may indicate access rights or grants are available to the roleand/or foreign (or target accounts) that will be granted rights underthe role. A target account may then be able to identify share objects orroles in other account to which the target account has been grantedrights or access. In one embodiment, share objects in a sharer accountmay be imported into the target account using alias objects andcross-account role grants.

In one embodiment, data sharing is initiated by the account that ownsthe data to be shared. For example, the sharer account creates a newtype of object, the share object. The share object has a unique name tobe identified within the sharer account. For example, the name may needto be unique within an account, but not necessarily across accounts.Share objects may be created, modified, and deleted by referencing themvia their name in the sharer account.

In one embodiment, each share object contains a single role. Grantsbetween this role and objects define what objects are being shared andwith what privileges these objects are shared. The role and grants maybe similar to any other role and grant system in the implementation ofrole-based access control. By modifying the set of grants attached tothe role in a share objects, more objects may be shared (by addinggrants to the role), fewer objects may be shared (by revoking grantsfrom the role), or objects may be shared with different privileges (bychanging the type of grant, for example to allow write access to ashared table object that was previously read-only).

In one embodiment, a share objects also contains a list of references toother customer accounts. Only these accounts that are specifically inthe share object may be allowed to look up, access, and/or import fromthis share object. By modifying the list of references of other customeraccounts, the share object can be made accessible to more accounts or berestricted to fewer accounts.

FIG. 7 is a schematic block diagram illustrating a share object SH1.Customer account A1 contains share object SH1. Share object SH1 has aunique name “SH1” in customer account A1. Share object SH1 contains roleR4 with grants to database D2, schema S2, and table T2. The grants ondatabase D2 and schema S2 may be usage grants and the grant on table T2may be a select grant. In this case, table T2 in schema S2 in databaseD2 would be shared read-only. Share object SH1 contains a list ofreferences to other customer accounts, including account A2.

After a share object is created, the share object may be imported orreferenced by a target account listed in the share object. For example,importing a share object from a sharer account is possible from othercustomer accounts. A target account may run a command to list allavailable share objects for importing. Only if a share object wascreated with references that included the target account, the targetaccount may list the share object and subsequently import it. In oneembodiment, references to a share object in another account are alwaysqualified by account name. For example, target account A2 wouldreference share SH1 in sharer account A1 with the example qualified name“A1.SH1”.

In one embodiment, a process or importing a share object may include:creating an alias object in the target account; linking the alias objectwith the top-most shared object in the sharer account in the objecthierarchy; granting a role in the target account usage privileges to thealias object; and granting the target account role usage privileges tothe role contained in the share object.

In one embodiment, a target account that imports the share object ordata creates an alias object. An alias object is similar to a normalobject in a customer account. An alias object has its own unique namewith which it is identified. An alias object may be linked to thetop-most object in each object hierarchy that is shared. If multipleobject hierarchies are shared, multiple alias objects may be created inthe target account. Whenever an alias object is used (e.g., reading fromthe alias object, writing to the alias object), the alias object isinternally replaced by the normal object in the sharer account to whichit links. This way, alias objects are merely proxy objects of normalobjects, and not duplicate objects. Thus, when reading from or writingto an alias object, the operations affect the original object that thealias links to. Similar to normal objects, when an alias object iscreated it is granted to the activated role of the user.

In addition to the alias object, a grant between a role in the targetaccount and the role contained in the share object is created. This is ausage grant from role to role across customer accounts. Role-basedaccess control now allows a user in the target account to access objectsin the sharer account.

FIG. 8 is a schematic block diagram illustrating logical grants andlinks between different accounts. A database alias object D5 is createdin account A2. Database alias D5 references database D2 via link L1.Role R3 has a usage grant G1 on database D5. Role R3 has a second usagegrant G2 to role R4 in customer account A1. Grant G2 is a cross-accountgrant between accounts A1 and A2. In one embodiment, role-based accesscontrol allows a user in account A2 with activated role R3 to accessdata in account A1. For example, if a user in account A2 wants to readdata in table T2, role-based access control allows that because role R3has a usage grant of role R4 and role R4, in turn, has a select grant ontable T2. By way of illustration, a user with activated role R3 mayaccess T2 by running a query or selection directed to “D5.S2.T2”.

Using object aliases and cross-account grants from a role in the targetaccount to a role in the sharer account allows users in the targetaccount to access information in the sharer account. In this way, adatabase system may enable sharing of data between different customeraccounts in an instantaneous, zero-copy, easy-controllable fashion. Thesharing can be instantaneous because alias objects and cross-accountgrants can be created in milliseconds. The sharing can be zero-copybecause no data has to be duplicated in the process. For example, allqueries, or selections can be made directly to the shared object in thesharer account without creating a duplicate in the target account. Thesharing is also easy to control because it utilizes easy-to-usetechniques of role-based access control. Additionally, in embodimentswith separated storage and compute, there is no contention amongcomputing resources when executing queries on shared data. Thus,different virtual warehouses in different customer accounts mayindividually process shared data. For example, a first virtual warehousefor a first account may process a database query or statement using datashared by a sharer account and a second virtual warehouse for a secondaccount, or the sharer account, may process a database query orstatement using the shared data of the sharer account.

FIG. 9 is a schematic block diagram of a share component 210. The sharecomponent 210 includes a cross-account rights component 902, an aliascomponent 904, a request component 906, an access component 908, and aprocessing component 910. The components 902-910 are given by way ofexample only and may not all be included in all embodiments. Forexample, each of the components 902-910 may be included in or may beimplemented as part of a separate device or system.

The cross-account rights component 902 is configured to create andmanage rights or grants between accounts. The cross-account rightscomponent 902 may generate a share object in a sharer account. Forexample, a user of the sharer account may provide input indicating thatone or more resources should be shared with another account. In oneembodiment, the user may select an option to create a new share objectso that resources can be shared with foreign accounts. In response tothe user input, the cross-account rights component 902 may create ashare object in the sharer account. The share object may include a roleto which access rights can be granted to resources for sharing with aforeign account. The foreign account may include a customer account orother account that is separate from the sharer account. For example, theforeign account may be another account hosted on a multi-tenant databasesystem.

Upon creation, the share object may be granted rights to one or moreresources within the sharer account. The resources may include adatabase, a schema, a table, a sequence, or a function of the shareraccount. For example, the share object may contain a role (i.e., sharerole) which is granted right to read, select, query, or modify a datastorage object, such as a database. The share object, or share role inthe share object, may be granted rights similar to how rights may begranted to other roles using role based access control. A user may beable to access an account and grant rights to the share role so that theshare role can access resources that are meant to be shared with foreignaccounts. In one embodiment, the share object may include a list ofobjects, and an access level, for which the share role has rights.

The share object may also be made available or linked to specificforeign accounts. For example, the share object may store a list ofaccounts that have rights to the share role or share object in thesharer account. A user with the sharer account may add or removeaccounts to the list of accounts. For example, the user may be able tomodify the list to control which accounts can access objects shared viathe share object. Foreign accounts listed or identified in the shareobject may be given access to resources with access rights granted to ashare role of the share object. In one embodiment, a specific accountcan perform a search to identify share objects or sharer accounts thathave been shared with the specific account. A list of available shareobjects can be viewed by a user of the target or specific account.

The alias component 904 is configured to generate an alias for data or adata object shared by a separate account. For example, the alias objectmay create, in a target account, an alias object corresponding to ashared resource shared by a sharer account. In one embodiment, the aliasobject is created in response to a target account accepting a sharedresource or trying to access a shared resource for the first time. Thealias object may act as an alias for a data object for the highestobject hierarchy shared by the sharer account (see, e.g., FIG. 8 whereD5 is an alias for D2). The alias component 904 may also generate a linkbetween the alias object and a shared object (see, e.g., FIG. 8 where L1is the link between D5 and D2). The link may be created and/or stored inthe form of an identifier or name of the original or “real” object. Forexample, the link L1 in FIG. 8 may include an identifier for D2 storedin the alias object D5 that includes a unique system wide name, such as“A1.D2”.

The alias component 904 may also grant a role in the target account (theaccount with which the sharer account has shared data or resources)access rights to the alias object (see, e.g., G1 of FIG. 8).Additionally, the alias component 904 may also grant the role in thetarget account to a share role in the share object of the sharer account(see, e.g., G2 of FIG. 8). With the alias object created, a link betweenthe alias object and an object in the sharer account, and grants to arole in the target account, the target account may be free to runqueries, statements, or “see” shared data or resources in the shareraccount.

The request component 906 is configured to receive a request from anaccount to access a shared resource in a different account. The requestmay include a database query, select statement, or the like to access aresource. In one embodiment, the request includes a request directed toan alias object of the requesting account. The request component 906 mayidentify a resource with which the alias object is linked, such as adatabase or table in a sharer account. The request component 906 mayidentify the linked object based on an identifier of the alias object.

The access component 908 is configured to determine whether an accounthas access to a shared resource of a different account. For example, ifa first account requests access to a resource of a different, secondaccount, the access component 908 may determine whether the secondaccount has granted access to the first account. The access component908 may determine whether a requesting account has access by determiningwhether a share object identifies the requesting account. For example,the access component 908 may check if the requesting account is presentin a list of accounts stored by a share object. The access component 908may also check whether the share object that identifies the requestingaccount has access rights (e.g., grants) to the targeted data resourcein the sharer account.

In one embodiment, the access component 908 may check for the presenceof a grant from a share role in a sharer account to a requesting role inthe requesting account. The access component 908 may check whether alink exists between an alias object to which a database request orstatement was directed or whether a grant exists between a requestingrole and the alias object. For example, the access component 908 maycheck for the existence or presence of one or more of L1, G1 and G2illustrated in FIG. 8. Furthermore, the access component 908 may checkfor a grant between a role in a share object to an object (such as atable or database) of the sharer account. For example, the accesscomponent 908 may check for the existent of a grant between the role R4and the database D2 in FIG. 8. If the access component 908 determinesthat the requesting account has access to the shared resource, therequest may be fulfilled by the share component 210 or a processingcomponent 910. If the access component 908 determines that therequesting account does not have rights to the requested data or object,the request will be denied.

The processing component 910 is configured to process database requests,queries, or statements. The processing component 910 may process andprovide a response to a request from an account to access or use data orservices in another account. In one embodiment, the processing component910 provides a response to a request by processing the request usingoriginal data in a sharer account that is different from the requestingaccount. For example, the request may be directed toward a database ortable stored in or for a first account and the processing component 910may process the request using the database or table of the first accountand return a response to a requesting, second account.

In one embodiment, the processing component 910 performs processing ofshared data without creating a duplicate table or other data source inthe requesting account. Generally, data must be first ingested into anaccount that wishes to process that data or perform operations againstthe data. The processing component 910 may save processing time, delay,and/or memory resources by allowing a target account to access sharedresources in a sharer account without creating a copy of a data resourcein the target account.

The processing component 910 may perform processing of the same datausing different processing resources for different accounts. Forexample, a first virtual warehouse for a first account may process adatabase query or statement using data shared by a sharer account and asecond virtual warehouse for a second account, or the sharer account,may process a database query or statement using the shared data of thesharer account. Using separate processing resources to process the samedata may prevent contention for processing resources between accounts.The processing resources may include dynamically provisioned processingresources. In one embodiment, processing of shared data is performedusing a virtual warehouse for the requesting account even though thedata may be located in storage for a different account.

FIG. 10 is a schematic flow chart diagram illustrating an example method1000 for sharing database data or resources. The method 1000 may beperformed by a database system, such as by a share component 210 as inFIG. 1 or 9 or by a database system as in FIG. 1, 2, or 3.

The method 1000 begins and a cross-account rights component 902generates at 1002 a share object in a first account comprising a sharerole. The cross-account rights component 902 associates at 1004 one ormore access rights with the share role, wherein the one or more accessrights indicate which objects in the first account are accessible basedon the share object. The cross-account rights component 902 grants at1006, to a second account, cross-account access rights to the share roleor share object in the first account. A request component 906 receivesat 1008 a request from the second account to access data or services ofthe first account. A processing component 910 provides at 1010 aresponse to the second account based on the data or services of thefirst account.

FIG. 11 is a block diagram depicting an example computing device 1100.In some embodiments, computing device 1100 is used to implement one ormore of the systems and components discussed herein. Further, computingdevice 1100 may interact with any of the systems and componentsdescribed herein. Accordingly, computing device 1100 may be used toperform various procedures and tasks, such as those discussed herein.Computing device 1100 can function as a server, a client or any othercomputing entity. Computing device 1100 can be any of a wide variety ofcomputing devices, such as a desktop computer, a notebook computer, aserver computer, a handheld computer, a tablet, and the like.

Computing device 1100 includes one or more processor(s) 1102, one ormore memory device(s) 1104, one or more interface(s) 1106, one or moremass storage device(s) 1108, and one or more Input/Output (I/O)device(s) 1110, all of which are coupled to a bus 1112. Processor(s)1102 include one or more processors or controllers that executeinstructions stored in memory device(s) 1104 and/or mass storagedevice(s) 1108. Processor(s) 1102 may also include various types ofcomputer-readable media, such as cache memory.

Memory device(s) 1104 include various computer-readable media, such asvolatile memory (e.g., random access memory (RAM)) and/or nonvolatilememory (e.g., read-only memory (ROM)). Memory device(s) 1104 may alsoinclude rewritable ROM, such as Flash memory.

Mass storage device(s) 1108 include various computer readable media,such as magnetic tapes, magnetic disks, optical disks, solid statememory (e.g., Flash memory), and so forth. Various drives may also beincluded in mass storage device(s) 1108 to enable reading from and/orwriting to the various computer readable media. Mass storage device(s)1108 include removable media and/or non-removable media.

I/O device(s) 1110 include various devices that allow data and/or otherinformation to be input to or retrieved from computing device 1100.Example I/O device(s) 1110 include cursor control devices, keyboards,keypads, microphones, monitors or other display devices, speakers,printers, network interface cards, modems, lenses, CCDs or other imagecapture devices, and the like.

Interface(s) 1106 include various interfaces that allow computing device1100 to interact with other systems, devices, or computing environments.Example interface(s) 1106 include any number of different networkinterfaces, such as interfaces to local area networks (LANs), wide areanetworks (WANs), wireless networks, and the Internet.

Bus 1112 allows processor(s) 1102, memory device(s) 1104, interface(s)1106, mass storage device(s) 1108, and I/O device(s) 1110 to communicatewith one another, as well as other devices or components coupled to bus1112. Bus 1112 represents one or more of several types of busstructures, such as a system bus, PCI bus, IEEE 1394 bus, USB bus, andso forth.

For purposes of illustration, programs and other executable programcomponents are shown herein as discrete blocks, although it isunderstood that such programs and components may reside at various timesin different storage components of computing device 1100, and areexecuted by processor(s) 1102. Alternatively, the systems and proceduresdescribed herein can be implemented in hardware, or a combination ofhardware, software, and/or firmware. For example, one or moreapplication specific integrated circuits (ASICs) can be programmed tocarry out one or more of the systems and procedures described herein. Asused herein, the terms “module” or “component” are intended to conveythe implementation apparatus for accomplishing a process, such as byhardware, or a combination of hardware, software, and/or firmware, forthe purposes of performing all or parts of operations disclosed herein.

Examples

The following examples pertain to further embodiments.

Example 1 is a method for computer readable storage media storinginstructions that, when executed by one or more processors, cause theprocessors to generate a share object in a first account comprising ashare role. The instructions cause the one or more processors toassociate one or more access rights with the share role, wherein the oneor more access rights indicate which objects in the first account areaccessible based on the share object. The instructions cause the one ormore processors to grant, to a second account, cross-account accessrights to the share role or share object in the first account. Theinstructions cause the one or more processors to receive a request fromthe second account to access data or services of the first account. Theinstructions cause the one or more processors to provide a response tothe second account based on the data or services of the first account.

In Example 2, the one or more objects in Example 1 include one or moreof a database object, a schema, a table, a sequence, or a function.

In Example 3, the instructions in any of Examples 1-2 further cause theone or more processors to associate the one or more access rights withthe share role by storing a list of objects for which the share role hasrights.

In Example 4, the instructions in any of Examples 1-3 cause the one ormore processors to grant the one or more access rights by storing anindication of the second account in a list of accounts that have rightsto the share role or share object in the first account.

In Example 5, the instructions in any of Examples 1-4 cause the one ormore processors to receive the request by receiving a request directedto an alias object in the second account.

In Example 6, the instructions in any of Examples 1-5 cause the one ormore processors to provide the response by processing the request usinga virtual warehouse of the second account.

In Example 7, the instructions in any of Examples 1-6 cause the one ormore processors to provide the response by processing the requestwithout creating a duplicate table or other data source in the secondaccount.

In Example 8, the instructions in any of Examples 1-7 further cause theone or more processors to determine that the second account has accessrights to the requested data or services of the first account.

In Example 9, the instructions in Example 8 cause the one or moreprocessors to determine that the second account has access rights bydetermining that a grant exists from the share object or share role tothe first account.

In Example 10, the instructions in any of Examples 8-9 cause the one ormore processors to determine that the second account has access rightsby determining that a link exists between an alias object in the secondaccount to the data or services of the first account.

Example 11 is a multi-tenant database system that includes across-account rights component, an alias component, and an accesscomponent. The cross-account rights component is configured to determinethat cross-account access rights to one or more shared resources havebeen granted to a target account by a sharer account. The aliascomponent is configured to create, in the target account, an aliasobject corresponding to a shared resource of the one or more sharedresources in the sharer account. The access component is configured toallow the target account to access the shared resource using a requestdirected to the alias object.

In Example 12, the alias component as in Example 11 is configured tolink the alias object in the target account to the shared resource inthe sharer account.

In Example 13, the alias component as in any of Examples 11-12 isfurther configured to grant, to a role in the target account, accessrights to the alias object.

In Example 14, the one or more shared resources as in any of Examples11-3 include one or more of a database object, a schema, a table, asequence, or a function of the sharer account.

In Example 15, the cross-account rights component as in any of Examples11-14 is configured to determine that cross-account access rights havebeen granted based on a list of accounts that have rights to a sharerole or share object in the sharer account, wherein the share role orshare object has rights to the one or more shared resources.

In Example 16, the access component in any of Examples 11-15 isconfigured to allow the target account to access the shared resources inresponse to determining that cross-account access rights have beengranted based on the existence of a grant from a share object or sharerole in the sharer account to the target account.

In Example 17, the access component in any of Examples 11-15 isconfigured to allow the target account to access the shared resources inresponse to determining that cross-account access rights have beengranted based on a link existing between an alias object in the targetaccount to the data or services of the sharer account.

In Example 18, the system as in any of Examples 11-16 further comprisesa processing component configured to process the shared resources in thesharer account without creating a copy of a data resource in the targetaccount.

In Example 19, the system as in any of Examples 11-16 further includes aprocessing component configured to provide the response using a virtualwarehouse of the second account.

In Example 20, the processing component as in any of Examples 18-18 isconfigured to provide a response to a request by processing the requestusing original data in the sharer account.

Example 21 is a method for providing access to shared data in amulti-tenant database. The method includes determining that a firstaccount has granted a second account access to a database object of thefirst account. The method includes receiving a request from the secondaccount to access the data object corresponding to the first account.The method includes processing the request using a virtual warehousecorresponding to the second account, wherein the virtual warehousecomprises a set of one or more compute nodes configured to access datain a storage layer corresponding to the first account to generate aresponse to the request.

In Example 22, determining that the first account has granted a secondaccount access as in Example 21 includes determining that the firstaccount lists the second account has having rights to a share object orshare role in the first account, wherein the share object or share rolehas access rights to the database object of the first account.

In Example 23, receiving the request as in any of Examples 21-22includes receiving a request directed toward an alias object in thesecond account, wherein the alias object is linked with the databaseobject.

In Example 24, providing the response as in any of Examples 21-23includes processing the request using data in a data object of the firstaccount.

Example 25 is an apparatus including means to perform a method orrealize an apparatus or system as in any of Examples 1-20.

Example 26 is a machine readable storage including machine-readableinstructions, when executed, to implement a method or realize anapparatus of any of Examples 11-25.

Various techniques, or certain aspects or portions thereof, may take theform of program code (i.e., instructions) embodied in tangible media,such as floppy diskettes, CD-ROMs, hard drives, a non-transitorycomputer readable storage medium, or any other machine readable storagemedium wherein, when the program code is loaded into and executed by amachine, such as a computer, the machine becomes an apparatus forpracticing the various techniques. In the case of program code executionon programmable computers, the computing device may include a processor,a storage medium readable by the processor (including volatile andnon-volatile memory and/or storage elements), at least one input device,and at least one output device. The volatile and non-volatile memoryand/or storage elements may be a RAM, an EPROM, a flash drive, anoptical drive, a magnetic hard drive, or another medium for storingelectronic data. One or more programs that may implement or utilize thevarious techniques described herein may use an application programminginterface (API), reusable controls, and the like. Such programs may beimplemented in a high-level procedural or an object-oriented programminglanguage to communicate with a computer system. However, the program(s)may be implemented in assembly or machine language, if desired. In anycase, the language may be a compiled or interpreted language, andcombined with hardware implementations.

It should be understood that many of the functional units described inthis specification may be implemented as one or more components, whichis a term used to more particularly emphasize their implementationindependence. For example, a component may be implemented as a hardwarecircuit comprising custom very large scale integration (VLSI) circuitsor gate arrays, off-the-shelf semiconductors such as logic chips,transistors, or other discrete components. A component may also beimplemented in programmable hardware devices such as field programmablegate arrays, programmable array logic, programmable logic devices, orthe like.

Components may also be implemented in software for execution by varioustypes of processors. An identified component of executable code may, forinstance, comprise one or more physical or logical blocks of computerinstructions, which may, for instance, be organized as an object, aprocedure, or a function. Nevertheless, the executables of an identifiedcomponent need not be physically located together, but may comprisedisparate instructions stored in different locations that, when joinedlogically together, comprise the component and achieve the statedpurpose for the component.

Indeed, a component of executable code may be a single instruction, ormany instructions, and may even be distributed over several differentcode segments, among different programs, and across several memorydevices. Similarly, operational data may be identified and illustratedherein within components, and may be embodied in any suitable form andorganized within any suitable type of data structure. The operationaldata may be collected as a single data set, or may be distributed overdifferent locations including over different storage devices, and mayexist, at least partially, merely as electronic signals on a system ornetwork. The components may be passive or active, including agentsoperable to perform desired functions.

Reference throughout this specification to “an example” means that aparticular feature, structure, or characteristic described in connectionwith the example is included in at least one embodiment of the presentdisclosure. Thus, appearances of the phrase “in an example” in variousplaces throughout this specification are not necessarily all referringto the same embodiment.

As used herein, a plurality of items, structural elements, compositionalelements, and/or materials may be presented in a common list forconvenience. However, these lists should be construed as though eachmember of the list is individually identified as a separate and uniquemember. Thus, no individual member of such list should be construed as ade facto equivalent of any other member of the same list solely based onits presentation in a common group without indications to the contrary.In addition, various embodiments and examples of the present disclosuremay be referred to herein along with alternatives for the variouscomponents thereof. It is understood that such embodiments, examples,and alternatives are not to be construed as de facto equivalents of oneanother, but are to be considered as separate and autonomousrepresentations of the present disclosure.

Although the foregoing has been described in some detail for purposes ofclarity, it will be apparent that certain changes and modifications maybe made without departing from the principles thereof. It should benoted that there are many alternative ways of implementing both theprocesses and apparatuses described herein. Accordingly, the presentembodiments are to be considered illustrative and not restrictive.

Those having skill in the art will appreciate that many changes may bemade to the details of the above-described embodiments without departingfrom the underlying principles of the disclosure. The scope of thepresent disclosure should, therefore, be determined only by thefollowing claims.

What is claimed is:
 1. A method comprising: sending, by a processingdevice to a multiple tenant database, a request for access to one ormore resources of a sharer account, the request causes the multipletenant database to: inspect the sharer account to determine a presenceof a grant to a second role object, in a target account associated withthe processing device, of access rights to a first role object includedin a share object in the sharer account; and grant the second roleobject, in the target account, access rights to an alias object, whereinthe share object includes the first role object having one or moregrants to the one or more resources of the sharer account, and whereinthe target account accesses the one or more resources using the one ormore grants of the share object and using the alias object without atleast one of copying the one or more resources or transmitting the oneor more resources; and receiving, by the processing device from themultiple tenant database, access to the one or more resources.
 2. Themethod of claim 1, wherein each grant of the one or more grantscomprises at least one of a usage grant, a modification grant, or aselect grant.
 3. The method of claim 1, wherein when the alias object isused, the alias object is internally replaced by an object associatedwith the one or more resources of the sharer account.
 4. The method ofclaim 1, wherein the sharer account and the target account are accountswithin the multiple tenant database.
 5. The method of claim 1, whereinthe alias object references a dataset associated with the one or moreresources of the sharer account and the sharer account shares the one ormore grants with one or more other target accounts such that the one ormore other target accounts can read the dataset without copying ortransmitting the dataset using one or more virtual warehousescorresponding to the one or more other target accounts.
 6. The method ofclaim 1, wherein the alias object references database data associatedwith the one or more resources of the sharer account.
 7. The method ofclaim 1, wherein the request for access further causes the multipletenant database to process the request from the target account using avirtual warehouse corresponding to the target account, wherein thevirtual warehouse comprises a set of one or more compute nodesconfigured to access data in a storage layer corresponding to the shareraccount to generate a response to the request.
 8. The method of claim 1,wherein the alias object serves as a proxy for an object associated withthe one or more resources of the sharer account.
 9. The method of claim1, wherein the request for access further causes the multiple tenantdatabase to create a link between the alias object and an objectassociated with the one or more resources of the sharer account.
 10. Themethod of claim 1, wherein the alias object references an objectassociated with the one or more resources of the sharer account, the oneor more resources of the sharer account are organized in an objecthierarchy, and the object is at the top of the object hierarchy.
 11. Asystem comprising: a memory; and one or more processors operativelycoupled to the memory, the one or more processors to: send, to amultiple tenant database, a request for access to one or more resourcesof a sharer account, the request causes the multiple tenant database to:inspect the sharer account to determine a presence of a grant to asecond role object, in a target account associated with the one or moreprocessors, of access rights to a first role object included in a shareobject in a sharer account and grant the second role object, in thetarget account, access rights to an alias object, wherein the shareobject includes the first role object having one or more grants to oneor more resources of the sharer account, and wherein the target accountaccesses the one or more resources using the one or more grants of theshare object and using the alias object without at least one of copyingthe one or more resources or transmitting the one or more resources; andreceive, from the multiple tenant database, access to the one or moreresources.
 12. The system of claim 11, wherein each grant of the one ormore grants comprises at least one of a usage grant, a modificationgrant, or a select grant.
 13. The system of claim 11, wherein when thealias object is used, the alias object is internally replaced by anobject associated with the one or more resources of the sharer account.14. The system of claim 11, wherein the sharer account and the targetaccount are accounts within the multiple tenant database.
 15. The systemof claim 11, wherein the alias object references a dataset associatedwith the one or more resources of the sharer account and the shareraccount shares the one or more grants with one or more other targetaccounts such that the one or more other target accounts can read thedataset without copying or transmitting the dataset using one or morevirtual warehouses corresponding to the one or more other targetaccounts.
 16. The system of claim 11, wherein the alias objectreferences database data associated with the one or more resources ofthe sharer account.
 17. The system of claim 11, wherein the request foraccess further causes the multiple tenant database to process therequest from the target account using a virtual warehouse correspondingto the target account, wherein the virtual warehouse comprises a set ofone or more compute nodes configured to access data in a storage layercorresponding to the sharer account to generate a response to therequest.
 18. The system of claim 11, wherein the alias object serves asa proxy for an object associated with the one or more resources of thesharer account.
 19. The system of claim 11, wherein the request foraccess further causes the multiple tenant database to create a linkbetween the alias object and an object associated with the one or moreresources of the sharer account.
 20. The system of claim 11, wherein thealias object references an object associated with the one or moreresources of the sharer account, the one or more resources of the shareraccount are organized in an object hierarchy, and the object is at thetop of the object hierarchy.
 21. A non-transitory computer-readablemedium having instructions stored thereon that, when executed by one ormore processors, causes the one or more processors to: send, by the moreor more processors to a multiple tenant database, a request for accessto one or more resources of a sharer account, the request causes themultiple tenant database to: inspect the sharer account to determine apresence of a grant to a second role object, in a target accountassociated with the one or more processors, of access rights to a firstrole object included in a share object in a sharer account and grant thesecond role object, in the target account, access rights to an aliasobject, wherein the share object includes the first role object havingone or more grants to one or more resources of the sharer account, andwherein the target account accesses the one or more resources using theone or more grants of the share object and using the alias objectwithout at least one of copying the one or more resources ortransmitting the one or more resources; and receive, from the multipletenant database, access to the one or more resources.
 22. Thenon-transitory computer-readable medium of claim 21, wherein each grantof the one or more grants comprises at least one of a usage grant, amodification grant, or a select grant.
 23. The non-transitorycomputer-readable medium of claim 21, wherein when the alias object isused, the alias object is internally replaced by an object associatedwith the one or more resources of the sharer account.
 24. Thenon-transitory computer-readable medium of claim 21, wherein the shareraccount and the target account are accounts within the multiple tenantdatabase.
 25. The non-transitory computer-readable medium of claim 21,wherein the alias object references a dataset associated with the one ormore resources of the sharer account and the sharer account shares theone or more grants with one or more other target accounts such that theone or more other target accounts can read the dataset without copyingor transmitting the dataset using one or more virtual warehousescorresponding to the one or more other target accounts.
 26. Thenon-transitory computer-readable medium of claim 21, wherein the aliasobject references database data associated with the one or moreresources of the sharer account.
 27. The non-transitorycomputer-readable medium of claim 21, wherein the request for accessfurther causes the multiple tenant database to process the request fromthe target account using a virtual warehouse corresponding to the targetaccount, wherein the virtual warehouse comprises a set of one or morecompute nodes configured to access data in a storage layer correspondingto the sharer account to generate a response to the request.
 28. Thenon-transitory computer-readable medium of claim 21, wherein the aliasobject serves as a proxy for an object associated with the one or moreresources of the sharer account.
 29. The non-transitorycomputer-readable medium of claim 21, wherein the request for accessfurther causes the multiple tenant database to create a link between thealias object and an object associated with the one or more resources ofthe sharer account.
 30. The non-transitory computer-readable medium ofclaim 21, wherein the alias object references an object associated withthe one or more resources of the sharer account, the one or moreresources of the sharer account are organized in an object hierarchy,and the object is at the top of the object hierarchy.